<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增方剂分类')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-sort-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">分类名称：</label>
                <div class="col-sm-8">
                    <input name="sortName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
				<label class="col-sm-3 control-label">条文类型字典：</label>
				<div class="col-sm-8">
					<select name="dictLable" class="form-control m-b" th:with="type=${@dict.getType('sys_prescription_sort')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictCode}"></option>
	                </select>
				</div>
			</div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">排序：</label>
                <div class="col-sm-8">
                    <input name="ord" class="form-control" type="number" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否启用 ：</label>
                <div class="col-sm-9">
				    <label class="radio-box">
				        <input type="radio" checked="true" value="0" id="optionsRadios1" name="status">不启用
				    </label>
				    <label class="radio-box">
				        <input type="radio" value="1" id="optionsRadios2" name="status">启用
				    </label>
				</div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">数据备注：</label>
                <div class="col-sm-8">
                    <input name="dataRemark" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/sort"
        $("#form-sort-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-sort-add').serialize());
            }
        }

    </script>
</body>
</html>